#ifndef _QLEARNING_
#define _QLEARNING_
#include "stdio.h"
#include "stdlib.h"
#include "time.h"
#include "math.h"


extern int number_ball_bounce;

extern float volleyball_highest;

extern float volleyball_targetpos_vel;

extern float last_volleyball_highest;

extern float last_volleyball_targetpos_vel;

extern int state_init_receive;

extern int oumiga;

extern float time_start_remain;

extern int current_action;

extern int q[20][20] ;

void Q_table_init();

int state_init();

void Q_learning_train();

void Q_learning_use();

int state_array_trans(float a);

int max(int* p, int m);

float r_action(float h);

typedef struct{
	int v;
	int w;
	int q;
}train_point_t;

extern train_point_t train_point;

#endif